package com.example.foobar.dto;

import com.example.foobar.utils.Utils;
import lombok.Data;

import java.util.Date;

@Data
public class RetentionRateDTO {
    private Integer uniacid;

    private String sceneId;

    private Integer newComerCount = 0;

    private Integer retentionAmount = 0;

    private Date retentionRateDate;

    private Date baseDate;

    private String remark;

    private String retentionRate;

    public RetentionRateDTO(){

    }

    public RetentionRateDTO(Integer uniacid, String sceneId, Date baseDate, Date retentionRateDate){
        this.uniacid = uniacid;
        this.sceneId = sceneId;
        this.baseDate = baseDate;
        this.retentionRateDate = retentionRateDate;
    }

    public String getRetentionRate(){
        return Utils.formateRate(retentionAmount, newComerCount);
    }
}
